#ifndef _camera_h_included_
#define _camera_h_included_
#include <d3dx9.h>
#include <d3d9.h>
#include "DXUtil.h"

//This is a simple camera class
//Dose not support rotation, but stores it's value.
class Camera
{
	point_t location;
	float rotation;

	//Matrices
	D3DXMATRIX ViewMatrix;
	D3DXMATRIX matProjection;

	D3DXVECTOR3 EyePoint;
	D3DXVECTOR3 LookAt;
	D3DXVECTOR3 UpVector;

	float fov;
	float aspectRatio;
	float nearPlane;
	float farPlane;

public:
	Camera();

	//Returns the matrices for this camera
	D3DXMATRIX* GetViewMatrix();
	D3DXMATRIX* GetProjectionMatrix();

	D3DXVECTOR3* GetEyePos();
	D3DXVECTOR3* GetLookAt();
	D3DXVECTOR3* GetUpVector();

	void SetRot(float pr);
	void SetEyePos(D3DXVECTOR3 pEye);
	void SetLookAt(D3DXVECTOR3 plook);
	void SetUpVector(D3DXVECTOR3 pUp);

	float GetRot();
	float GetFov();
	float GetAspectRatio();
	float GetNearPlane();
	float GetFarPlane();

	void SetFov(float pFov);
	void SetAspectRatio(float pAR);
	void SetNearPlane(float pNP);
	void SetFarPlane(float pFP);
};
#endif
